Welcome to KonsolScript Community Wiki. We are still trying to fill out this page. Hopefully, we could finally finish a well written KonsolScript Programmer's Reference.
Any individual who is interested to help can join the process. Just start posting.
Listed are the data types supported by KonsolScript.
-
Number - stores numeric values.
String - stores textual value.
-
Listed are the control statements supported by KonsolScript.
if - executes scoped commands depending of the provided condition.
else - executes scoped commands automatically.
-
Listed are the looping statements supported by KonsolScript.
for - executes scoped commands with a
definite number of repetition.
while - executes scoped commands with a
indefinite number of repetition.
Listed are the classes that KonsolScript has.
-
-
Screen - for displaying messages to screen.
File - for accessing files for Read, Write or both.
Key - Class for binding with Keyboard.
Mouse - for showing and hiding mouse cursor.
Net - for creating a networked game/program.
Sound - for loading and playing WAV/
MP3/OGG audio files.
Time - Class to have access to the PC clock.
Konsol - Class to be used for general functions like showing message box.
Array - Class to be used if you want to declare Array and/or set its value.
Math - for manipulating
Number and numeric values.
-
Var - Class to be used if you want to declare variable and/or set its value.
Listed are built-in KonsolScript variables that are mostly read-only, and ready to be used.
B1 - key-bind for Escape (ESC) key.
B2 - key-bind for Control (CTRL) key.
B3 - key-bind for Enter or Return key.
B4 - key-bind for Space key.
BU - key-bind for Up arrow key.
BD - key-bind for Down arrow key.
BL - key-bind for Left arrow key.
BR - key-bind for Right arror key.
LMB - mouse-bind for Left Mouse Button, thus LMB.
MMB - mouse-bind for Middle Mouse Button, thus MMB.
RMB - mouse-bind for Right Mouse Button, thus RMB.
lastpress - contains
ASCII value of last pressed key.
lastunpress - contains
ASCII value of last unpressed key.
-
-
textwidth - contains a single character's width in pixel value.
textheight - contains a single character's height in pixel value.
cursorX - contains X-location on screen for printing strings.
cursorY - contains Y-location on screen for printing strings.
mouseX - contains mouse' X-location on screen.
mouseY - contains mouse' Y-location on screen.
state - a read and write variable to be used with event-handling functions.
args - contains any arguments passed when a script was executed.
Listed are functions that are known to KonsolScript and will be called if existing.
main -
entry point of KonsolScript; required function to any KonsolScript program.
Listed are event-handling functions. Called by KonsolScript Runtime's events-manager if existing.
mousedown - executed everytime the mouse is pressed.
mousemove - executed everytime the mouse is moved.
mouseup - executed everytime the mouse is unpressed.
keydown - executed everytime a key is pressed.
keyup - executed everytime a key is unpressed.
render - executed everytime screen is being updated.
cleanrender - same as
render, but clears the screen first before executing this function.
To help you get started, here are some KonsolScript tutorials.